***************************************************************************	
* Do file for AFRICAN REBEL DATA in McAllister "Casting a Shadow Over War Zones?  Hard Truths About the ICC's Efforts to Deter Wartime Atrocities"
***************************************************************************	


use ICC_All_Africa_Rebels_Sept2022_Final.dta


***************************************************************************	
* This portion replicates all data in Table 3
***************************************************************************	

**************************************
* RESULTS FROM MODEL 1: ICC actions during a conflict
**************************************
xtnbreg best_OSV25 ICC_conflict_actions rebweaker ln_best_bd pa ln_GDP_lag polity2 secessionist cent i.year, nolog re

**************************************
* RESULTS FROM MODEL 2: Cumulative ICC Actions
**************************************
xtnbreg best_OSV25 cum_ICC_actions rebweaker ln_best_bd pa ln_GDP_lag polity2 secessionist cent i.year, nolog re

**************************************
* RESULTS FROM MODEL 3: ICC actions vs Weaker Rebels
**************************************
xtnbreg best_OSV25 i.ICC_Conflict_ActionsDummy##i.rebweaker ln_best_bd pa ln_GDP_lag polity2 secessionist cent i.year, nolog re


***************************************************************************	
* This portion replicates all data in Table 4
***************************************************************************	
xtnbreg best_OSV25 ICC_conflict_actions rebweaker ln_best_bd pa ln_GDP_lag polity2 secessionist cent i.year, nolog re

***To calculate the margins of significant variables in Model 1, I employed the following commands (note, you need to re-run the above xtnbreg command to run each of the following commands):
margins, at(ICC_conflict_actions=(0 1)) atmeans vsquish post
margins, at(ln_best_bd=(20(10)80)) atmeans vsquish post
margins, at(polity2=(20(10)80)) atmeans vsquish post
margins, at(cent=(0 1)) atmeans vsquish post
margins, at(secessionist=(0 1)) atmeans vsquish post


***************************************************************************	
* This portion replicates all data from the online supplement	
***************************************************************************	

**************************************
* Summary Statistics
**************************************
summarize best_OSV25 ICC_conflict_actions ICC_Conflict_ActionsDummy cum_ICC_actions cum_ICC_actions dummy rebweaker ln_best_bd pa ln_GDP_lag polity2 secessionist cent
